
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[lr_jiaba]') AND type IN ('U'))
	DROP TABLE [dbo].[lr_jiaba]
GO
CREATE TABLE [dbo].[lr_jiaba](
	[user_serial] [int] NOT NULL,
	[bh] [smallint] NULL,
	[kssj] [smalldatetime] NOT NULL,
	[jssj] [smalldatetime] NOT NULL,
	[jsjg] [int] NULL,
	[bz] [text] NULL,
	[gly_no] [nvarchar](10) NULL,
	[shenhe] [nvarchar](10) NULL,
	[lx] [int] NULL,
	[jbrq] [datetime] NULL,
	[img_path] [varchar](500) NULL,
	[order_id] [int] NULL,
	[ot_begin] [int] NOT NULL,
	[ot_end] [int] NOT NULL,
	[over_time_type_id] [int] NULL,
	[is_repast] [int] NULL,
	[shift_id] [int] NULL,
	[is_delete] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

ALTER TABLE [dbo].[lr_jiaba] ADD  CONSTRAINT [DF__lr_jiaba__ot_beg__2DD28ED6]  DEFAULT ((0)) FOR [ot_begin]
GO

ALTER TABLE [dbo].[lr_jiaba] ADD  CONSTRAINT [DF__lr_jiaba__ot_end__2EC6B30F]  DEFAULT ((0)) FOR [ot_end]
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'lr_jiaba', @level2type=N'COLUMN',@level2name=N'user_serial'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加班开始时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'lr_jiaba', @level2type=N'COLUMN',@level2name=N'kssj'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加班结束时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'lr_jiaba', @level2type=N'COLUMN',@level2name=N'jssj'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加班时长' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'lr_jiaba', @level2type=N'COLUMN',@level2name=N'jsjg'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加班描述' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'lr_jiaba', @level2type=N'COLUMN',@level2name=N'bz'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'操作人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'lr_jiaba', @level2type=N'COLUMN',@level2name=N'gly_no'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审核人ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'lr_jiaba', @level2type=N'COLUMN',@level2name=N'shenhe'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加班日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'lr_jiaba', @level2type=N'COLUMN',@level2name=N'jbrq'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加班单ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'lr_jiaba', @level2type=N'COLUMN',@level2name=N'order_id'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加班类型ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'lr_jiaba', @level2type=N'COLUMN',@level2name=N'over_time_type_id'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否就餐' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'lr_jiaba', @level2type=N'COLUMN',@level2name=N'is_repast'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'班次ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'lr_jiaba', @level2type=N'COLUMN',@level2name=N'shift_id'
GO

